package com.syh.jn.scm.domain.supplier.event;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.supplier.entity.purchase.PurchaseOrder;

public class PurchaseOrderEvent extends DomainEvent<PurchaseOrder> {


  public static final String PURCHASE_ORDER_CONFIRM_RECEIPT = "purchaseOrderConfirmReceipt";
  public static final String PURCHASE_ORDER_CANCEL_RECEIPT = "purchaseOrderCancelReceipt";

  /**
   * 创建确认收货事件
   */
  public static PurchaseOrderEvent buildPurchaseOrderConfirmReceipt(Object[] values) {
    PurchaseOrderEvent purchaseOrderEvent = new PurchaseOrderEvent();
    purchaseOrderEvent.eventName = PURCHASE_ORDER_CONFIRM_RECEIPT;
    purchaseOrderEvent.values = values;
    return purchaseOrderEvent;
  }

  /**
   * 创建取消收货事件
   */
  public static PurchaseOrderEvent buildPurchaseOrderCancelReceipt(Object[] values) {
    PurchaseOrderEvent purchaseOrderEvent = new PurchaseOrderEvent();
    purchaseOrderEvent.eventName = PURCHASE_ORDER_CANCEL_RECEIPT;
    purchaseOrderEvent.values = values;
    return purchaseOrderEvent;
  }

  /**
   * 创建删除采购单事件
   */
  public static final String PURCHASE_ORDER_DESTORY = "PurchaseOrderDestory";
  public static PurchaseOrderEvent buildPurchaseOrderDestoryEvent(Object[] values) {
    PurchaseOrderEvent purchaseOrderEvent = new PurchaseOrderEvent();
    purchaseOrderEvent.eventName = PURCHASE_ORDER_DESTORY;
    purchaseOrderEvent.values = values;
    return purchaseOrderEvent;
  }

  /**
   * 创建取消采购单事件
   */
  public static final String PURCHASE_ORDER_CANCEL = "PurchaseOrderCancel";
  public static PurchaseOrderEvent buildPurchaseOrderCancelEvent(Object[] values) {
    PurchaseOrderEvent purchaseOrderEvent = new PurchaseOrderEvent();
    purchaseOrderEvent.eventName = PURCHASE_ORDER_CANCEL;
    purchaseOrderEvent.values = values;
    return purchaseOrderEvent;
  }


}
